<?php

require '../vendor/autoload.php';

define('APP_ROOT', dirname(__DIR__).'/');
define('WEB_ROOT', 'http://s.com/');

$config['displayErrorDetails'] = true;
$config['env'] = 'debug';
$config['log']['level'] = 'debug';
$config['log']['max_files'] = '5';
$config['log']['path'] = APP_ROOT . '/logs/';

$app = new \Slim\App(["settings" => $config]);


$container = $app->getContainer();

$container['http'] = function ($c) {
    $http = new GuzzleHttp\Client(
        [
            'timeout' => 10
        ]);
    return $http;
};

(new \Van\ServiceProvider\SettingServiceProvider())->register($container);

(new \Van\ServiceProvider\LogServiceProvider())->register($container);

$app->get('/chat', '\Controllers\ChatController:chat');
$app->run();
